package com.dong.system.controller;


import com.dong.response.ResponseResult;
import com.dong.system.service.MenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 菜单表 前端控制器
 * </p>
 *
 * @author dongjian
 * @since 2021-01-23
 */
@RestController
@RequestMapping("/system/menu")
public class MenuController {

    @Autowired
    MenuService menuService;

    @ApiOperation(value = "菜单列表", notes = "根据userId获取菜单列表")
    @GetMapping(value = "/getMenus")
    public ResponseResult getMenuVOS(@RequestParam String userId) {
        return ResponseResult.ok().data("menuVOS",menuService.getMenuVOS(userId));
    }
}

